#include "LuaLink_Camera.h"

LuaLink_Camera::LuaLink_Camera(Ogre::Camera* camera) {
	mCamera = camera;
}

LuaLink_Camera::~LuaLink_Camera(void) {
}

void LuaLink_Camera::lua_setPosition(Ogre::Vector3* pos){
	mCamera->setPosition(*pos);
}

void LuaLink_Camera::lua_setDirection(Ogre::Vector3* dir){
	mCamera->setDirection(*dir);
}

void LuaLink_Camera::lua_setNearClipDistance(Ogre::Real dist){
	mCamera->setNearClipDistance(dist);
}

void LuaLink_Camera::lua_setFarClipDistance(Ogre::Real dist){
	mCamera->setFarClipDistance(dist);
}

void LuaLink_Camera::lua_lookAt(Ogre::Vector3* pos){
	mCamera->lookAt(*pos);
}

Ogre::Vector3* LuaLink_Camera::lua_getPosition(){
	return new Ogre::Vector3(mCamera->getPosition().x, mCamera->getPosition().y, mCamera->getPosition().z);
}

Ogre::Vector3* LuaLink_Camera::lua_getDirection(){
	return new Ogre::Vector3(mCamera->getDirection().x, mCamera->getDirection().y, mCamera->getDirection().z);
}

void LuaLink_Camera::lua_move(Ogre::Vector3* vec){
	mCamera->move(*vec);
}

void LuaLink_Camera::lua_moveRelative(Ogre::Vector3* vec){
	mCamera->moveRelative(*vec);
}

void LuaLink_Camera::lua_roll(Ogre::Real angle){
	mCamera->roll(Ogre::Radian(angle));
}

void LuaLink_Camera::lua_yaw(Ogre::Real angle){
	mCamera->yaw(Ogre::Radian(angle));
}

void LuaLink_Camera::lua_pitch(Ogre::Real angle){
	mCamera->pitch(Ogre::Radian(angle));
}
